{extend name="public:layout" /}
{block name='title'}会议资讯{/block}
{block name='head'}
<link rel="stylesheet" href="/public/plugins/emoji/lib/css/jquery.mCustomScrollbar.min.css"/>
<link rel="stylesheet" href="/public/plugins/swiper/css/swiper.css"/>
<link rel="stylesheet" href="/public/plugins/emoji/dist/css/jquery.emoji.css"/>
<link rel="stylesheet" href="/public/plugins/dropload/dropload.css">
<style>
    .topbar {
        background: #333;
        color: #fff;
        padding: 10px 8px 6px 8px;
    }
    .swiper-container{z-index:0;}
    .weui-photo-browser-modal.weui-photo-browser-modal-visible{z-index:999999999;}
    .ovfHiden{overflow: hidden;height: 100%;}
</style>
<style>
</style>
{/block}
{block name="body"}
<div class="mcm-head" style="position:relative">
    <div class="head-left">
        <a href="javascript:history.back(-1)" class="link">
            <span class="iconfont icon-zuoyou1"></span>
        </a>
    </div>
    <div class="head-title">
        会议资讯
    </div>
</div>
<div id="list" style="padding:10px;">
</div>
<div id="page"></div>
{include file="public/footer"/}
{/block}
{block name='js'}
<script src="/public/plugins/dropload/dropload.min.js"></script>
<script src="/public/plugins/template/template.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/html" id="list-tpl">
    <ul class="mcm-imgtext-left">
    {{ each data as value index }}
        <li class="item">
            <a class="link" href="{:url('meetingContentInfo')}?id={{ value.id}}">
            </a>
            <div class="thumb">
                {{ if value.thumb ==''}}
                <img src="/public/home/bus/image/meeting.jpg" title="{{ value.title}}">
                {{ else }}
                <img src="{{ value.thumb }}" title="{{ value.title}}">
                {{ /if }}
            </div>
            <div class="text-info">
                <h2 class="info-tit">{{ value.title}}</h2>
                <p class="info-tag">发布日期：{{ value.create_time}}</p>
                <p class="info-desc">{{ value.desc }}</p>
            </div>
        </li>
    {{ /each}}
    </ul>
</script>
<script src="/public/home/bus/js/swiper.js"></script>
<script>
    // 页数
    var data = {
        page: 0,
        meeting_id:'{$Request.param.meeting_id}'
    };
    // dropload
    var drop = $('.content').dropload({
        scrollArea: window,
        loadDownFn: function (me) {
            data.page++;
            // 拼接HTML
            var result = '';
            $.ajax({
                url: "{:url('meetingContent')}",
                data: data,
                success: function (res) {
                    if (data.page >= res.last_page) {
                        // 锁定
                        me.lock();
                        // 无数据
                        me.noData();
                    }
                    var html = template('list-tpl', res);
                    $('#list').append(html);
                    me.resetload();
                },
                error: function (xhr, type) {
                    layer.open({
                        content: '加载出错'
                        , skin: 'msg'
                        , time: 2 //2秒后自动关闭
                    });
                    // 锁定
                    me.lock();
                    // 无数据
                    me.noData();
                    me.resetload();
                }
            });
        }
    });
</script>
{/block}